local fusheng = fk.CreateSkill {
  name = "th_fusheng",
}

fusheng:addEffect(fk.Damaged, {
  anim_type = "masochism",
  can_trigger = function(self, event, target, player, data)
    return target == player and player:hasSkill(fusheng.name) and player:isWounded()
  end,
  on_use = function(self, event, target, player, data)
    local room = player.room
    local judge = {
      who = player,
      reason = fusheng.name,
      pattern = ".|.|red",
    }
    room:judge(judge)
    if judge:matchPattern() and player:isWounded() then
      room:recover({
        who = player,
        num = 1,
        recoverBy = player,
        skillName = fusheng.name
      })
    end
  end,
})

Fk:loadTranslationTable{
  ["th_fusheng"] = "复生",
  [":th_fusheng"] = "当你受到伤害后，你可以判定，若为红色，你回复1点体力。",
}

return fusheng